1. Field of the Invention
The present invention relates to branching apparatus in a microword controlled computer system in general and, in particular, to a method and apparatus comprising a microword controlled computer system with an apparatus for selectively branching to, and thereby selecting for execution, a microword located in any one of N control stores and a microword register.
2. Description of Prior Art
A typical microword controlled computer system comprises a control store, a microword register coupled to the control store and a plurality of functional sub-units, e.g. adders, shifters, registers, etc., coupled to the microword register.
In operation, a microword in the control store is addressed, transferred out of the control store and placed in the microword register and executed. These three operations typically require three machine cycles, i.e. three clock pulses. In certain "pipelined" systems, the execution of a first microword overlaps the accessing of a second microword while the address of a third microword is set up in an address register.
In systems having two or more control stores, a branching circuit comprising a multiplexer coupled between the output of each of the control stores and the microword register is also provided. As used herein, a branch operation is defined as that operation which results in the selection for execution of one of a plurality of possible microwords.
In operation, a microword in each of the control stores is addressed and together they are provided simultaneously at corresponding inputs of the multiplexer. Thereafter, and in response to a branch control signal, one of the microwords is transferred to the microword register and executed. Once again, because a microword from each of the control stores is available to be transferred to the microword register, only three machine cycles are required to process either one of the microwords.
In conventional multiple control store systems, the operations comprising the transfer of an address to a control store address register, the transfer of a microword from a control store to the microword register and the execution of a microword in the microword register usually overlap. For example, in a two-control-store system, as one microword is being executed, a second microword, i.e. one from each of the control stores, is transferred to corresponding inputs of the multiplexer and an address, i.e. one for each of the control stores, is transferred to a corresponding address register.
Typically, each microword read from a control store includes an address field containing a branch address of a microword in another control store and a control field containing a control word. In a system comprising two control stores, A and B, control store A is said to be active when A controls the functional sub-units. Similarly, control store B is active when it is in control. Only one control store can be active at any time.
In a typical system, the branch decision is valid, i.e. active, only during the execution cycle of a previous microword. For example, in a two-control-store system comprising control stores A and B, a two-way branch is accomplished by ingating the address of both targets, i.e. a microword in each control store, into the address registers of the control stores, address registers AAR and BAR, respectively. The address of the active control store, called a fall-through address, is typically obtained by incrementing the previous address. The address of the microword in the then inactive control store, called a branch address, is obtained from the address field in the microword from the active control store. The branch decision, when it occurs, toggles a control signal controlling the multiplexer. Thus, if a branch decision is made during the execution of a microword from control store A, the next microword to be executed will be a microword from control store B which is located at the branch address which was obtained from the branch address field of the microword being executed.
In the above example, the number of control stores in the system corresponds to the number of branch paths required. That is, a two-way branch requires two control stores, a three-way branch requires three control stores, etc.
In certain applications, the number of control stores that can be made available to handle multiple branching paths is limited by cost and available space considerations. In such cases, for example, in the execution of a three-way branch in a system comprising two control stores, the branch can be carried out in two stages. In each case, however, branching to only one of the targets incurs no delay while branching to the other two targets is delayed by an additional cycle. Thus, assuming an equal probability of branching for all three targets, the average delay penalty for every three-way branch is 0.667 cycles.